<?php
class Zfarm_Bootstrap extends Zend_Application_Module_Bootstrap
{
	protected function _initAppAutoload()
	{
	    $autoloader = new Zend_Application_Module_Autoloader(array(
			'namespace' => 'zfarm',
	        'basePath'  => APPLICATION_PATH.'/modules/zfarm',
	    ));
             $autoLoader = Zend_Loader_Autoloader::getInstance();
             $autoLoader->registerNamespace('ZFarm_');

	    return $autoloader;
            
	}
        protected function _initActionHelpers() {
            Zend_Controller_Action_HelperBroker::addHelper(new ZFarm_Action_Helper_AssetsList());
        }
	protected function _initConfig()
	{
	    $this->config = new Zend_Config($this->getOptions(), true);
	    Zend_Registry::set('config', $this->config);
	    return $this->config;
	}
	protected function _initView(){
		$view = new Zend_View();
                $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
                $view->jQuery()->setUiVersion('1.8.6'); 
                $view->jQuery()->addStylesheet('https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/ui-lightness/jquery-ui.css');
                $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
                $viewRenderer->setView($view);
                Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
		$view->setEncoding('UTF-8');
		$view->doctype('XHTML1_TRANSITIONAL');
         }
         protected function _initModuleConfig()
        {
              // load ini file
              $iniOptions = new Zend_Config_Ini(APPLICATION_PATH. '/configs/zfarm.ini');

              // Set this bootstrap options
              $this->setOptions($iniOptions->toArray());
        }
}
